package builderpattern;

/**
 * @author Jonny Long
 * @date 2021/5/6 8:24
 */
public class Motherboard {
    private String CPU;
    private String RAM;

    public Motherboard() {
    }

    public Motherboard(String CPU, String RAM) {
        this.CPU = CPU;
        this.RAM = RAM;
    }

    @Override
    public String toString() {
        return "Motherboard{" + CPU + "," + RAM  + '}';
    }

    public Motherboard clone(){
        Motherboard motherboard = new Motherboard();
        motherboard.setCPU(this.CPU);
        motherboard.setRAM(this.RAM);
        return motherboard;
    }

    public String getCPU() {
        return CPU;
    }

    public void setCPU(String CPU) {
        this.CPU = CPU;
    }

    public String getRAM() {
        return RAM;
    }

    public void setRAM(String RAM) {
        this.RAM = RAM;
    }
}
